import request from '@/utils/request'

export function adminAddMail(data) {
  return request({
    url: '/management/mail/adminAddMail',
    method: 'post',
    data
  })
}

export function addMail(data) {
  return request({
    url: '/management/mail/addMail',
    method: 'post',
    data
  })
}

export function adminMailList(query) {
  return request({
    url: '/management/mail/adminMailList',
    method: 'get',
    params: query
  })
}

export function mailList(query) {
  return request({
    url: '/management/mail/mailList',
    method: 'get',
    params: query
  })
}

export function openEditMail(query) {
  return request({
    url: '/management/mail/openEditMail',
    method: 'get',
    params: query
  })
}

export function updateMailDefunct(query) {
  return request({
    url: '/management/mail/updateMailDefunct',
    method: 'post',
    params: query
  })
}

export function deleteMail(query) {
  return request({
    url: '/management/mail/deleteMail',
    method: 'post',
    params: query
  })
}

export function editMail(data) {
  return request({
    url: '/management/mail/editMail',
    method: 'post',
    data
  })
}
